package com.mtung.dubbo.loadbalance.impl;

import com.mtung.dubbo.loadbalance.LoadBalance;

import java.util.List;
import java.util.Random;

/**
 * @author : zhenguo.yao
 * @date : 2020/3/23 0023 14:11
 */
public class RandomLoadBalance implements LoadBalance {
    public String select(List<String> repos) {
        return repos.get(new Random().nextInt(repos.size()));
    }
}
